<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class GoodsShelf extends BaseModel
{
    use HasFactory;
    //仓库货架管理
    protected $table = 'goods_shelf';
    // 允许批量操作的字段
    protected $fillable = ['goods_shelf_name','is_del','warehouse_id','created_at','updated_at'];

    public function scopeSearch($query,$params)
    {
        return $query;
    }

    public function warehouse(){
        return $this->hasOne(Warehouse::class,'id','warehouse_id');
    }
}
